﻿using SIIE_ERP.BaseDatos;
using SIIE_ERP.Codigo;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Elysium.Demo.Registro
{
    /// <summary>
    /// Lógica de interacción para Window1.xaml
    /// </summary>
    public partial class WindowRegistro: Elysium.Controls.Window
    {
        public WindowRegistro()
        {            
            InitializeComponent();            
        }

        private void CloseAllWindows()
        {
            for (int intCounter = App.Current.Windows.Count - 1; intCounter > 0; intCounter--)
                App.Current.Windows[intCounter].Close();
        }

        private void Button_PrimerUso_Click(object sender, RoutedEventArgs e)
        {
            CloseAllWindows();
            WindowRegistroRutaBD w = new WindowRegistroRutaBD();
            w.Show();
            this.Hide();
        }

        private void Button_Archivo_Click(object sender, RoutedEventArgs e)
        {
            CloseAllWindows();
            WindowSeleccionRutaBD w = new WindowSeleccionRutaBD();
            w.Show();
            this.Hide();
        }

        private void Window_Closed(object sender, EventArgs e)
        {
            Application.Current.Shutdown(0); // Cerrar definitivamente la aplicacion
        }
    }
}
